diff --git a/bigbluebutton-html5/imports/ui/components/presentation/cursor/container.jsx b/bigbluebutton-html5/imports/ui/components/presentation/cursor/container.jsx
index 4125eb7859..b53f247b43 100644
--- a/bigbluebutton-html5/imports/ui/components/presentation/cursor/container.jsx
+++ b/bigbluebutton-html5/imports/ui/components/presentation/cursor/container.jsx
@@ -12,8 +12,8 @@ const ROLE_MODERATOR = Meteor.settings.public.user.role_moderator;
const CursorContainer = (props) => {
const { cursorX, cursorY, presenter, uid, isViewersCursorLocked } = props;
+ const usingUsersContext = useContext(UsersContext);
if (cursorX > 0 && cursorY > 0) {
- const usingUsersContext = useContext(UsersContext);
const { users } = usingUsersContext;
const role = users[Auth.meetingID][Auth.userID].role;
const userId = users[Auth.meetingID][Auth.userID].userId;
diff --git a/bigbluebutton-html5/imports/ui/components/sidebar-content/container.jsx b/bigbluebutton-html5/imports/ui/components/sidebar-content/container.jsx
index 3748156e66..c2dd53a70d 100644
--- a/bigbluebutton-html5/imports/ui/components/sidebar-content/container.jsx
+++ b/bigbluebutton-html5/imports/ui/components/sidebar-content/container.jsx
@@ -9,13 +9,12 @@ const SidebarContentContainer = () => {
const sidebarContentOutput = layoutSelectOutput((i) => i.sidebarContent);
const layoutContextDispatch = layoutDispatch();
const { sidebarContentPanel } = sidebarContentInput;
-
- if (sidebarContentOutput.display === false) return null;
-
const usingUsersContext = useContext(UsersContext);
const { users } = usingUsersContext;
const amIPresenter = users[Auth.meetingID][Auth.userID].presenter;
+ if (sidebarContentOutput.display === false) return null;
+
return (