fix for ios6 UIApplicationInvalidInterfaceOrientation  exception.