Fix task instance problem