fix bugs in task apis