fixed bug that cause notification to be sent too often