fix rest complete task issue