fix compact query when components == 1