Fixing errors introduced in iOS 6.1