fixing ugly output of incorrect query calls