Fix bugs with navigation