fix bug in Task.toString