fix task query issue