fixed rotation problems in iOS8