fixes to make the rotation work properly for ios 8.0