Fixes memory allocation crash with iOS 7 on device