Fix #983
Fix #954. Prevent from returning next time notif in the past.
Fix #954. Remove pdb. Will add the issue as test case.
Fix #383 and #897. Same PR as #918
Fix #1005
Fix #1029 + test case