fixed hasAttribute on queries