Fix task saving error