Fixing notification function