avoid doubly opening menu