fix add task functionality