bug fixed when adding a task