fix problem when updating task