fixed the add and edit task issues