Fixed bug with navigation bar and multiple view states