Code changes for navigation controller