fixes some generated queries