Fix TaskRecord type error