fixed a bug when processing generic tasks