The notification system gets messed up when the task is closed. This distinction needs to be included in the code.