fix on tasks duplicated record. TODO: use update instead