fixed bugs with navigation, now all works fine