Bug fix in 1-dimensional queries