fixed mistake in simqueries