improvements to task handling; fixes