random tweaks to make some queries work