Fixed bugs in task retraction that messed up re-planning and messed up time constraints after re-planning