fixing errors with navigation