Fixed new and edit task issue