Fix bug when no context menu has been set yet