fix the bug when get results for queries. fix bug when assign tasks