Fixed bug with reporting error from task