Fixed bug with iOS 8 rotation