Fix task query