Fixed menu button bug while transitioning between pages.