fixed task query bug