fix bug, GTD function