minor bugfixes to client/query types