fix bugs while showing menu