Fixed the notifys and added a test case