fix bugs when the navigationController is not the root hierarchy at windows.