bug fix to task class