Fixes for issues caught by tests
CR feedback
Merge pull request #4 from talko/apns_fixes

Fixes for issues caught by tests