Fixed a bug with context menus