Fixed a bug where having too many parameters in a multiple result query could cause an error