fixed any issues with the query system I found

mostly handling listed items, but other various things too. now there
seems to be an issue in my testing logic.