Small fix to navigation logic