Fixes bug where empty set of dimensions caused SQL error