Fix bug for submenus appearing with collapsed sidebar