[BUGFIX] JavaScript error when switching to workspace