Fixed potential rootviewcontroller issue in ios7