Update hashcode method of task classes