Fixing push notification code