fix navigating between pages