Fix updateTaskStatus method in taskEntityManager.