refactored timeout bug on navigation