changed AppCtrl to close the menu when navigation succeed.