Fix bug in Task class

Signed-off-by: Rick Copeland <rick@arborian.com>