Fixed the navigation wrapping issue

I feel like this was a little *too* easy, won't be surprised if it
breaks.