add tests for TaskCreation;
fix a little bug in TaskCreation.