Fixed a bug not finding rootViewController of keyWindow