fix retrieving task bug