Fixed task query issue