Fix problem with popupMenu's hide