Bug fix for 1-dimensional output queries