fix bug when menu is drawn even if not visible