APNS error handling bugfix