Fixed ios orientation bugs