Fixing some bugs with navigation