notification function bug fix