Fix push notification bugs