Additional sleep to avoid:

You gave an invalid object reference.  The object may have recently been
deleted.  The class parameter gives the type of reference given, and the
handle parameter echoes the bad value given.  class: task...