Fix query methods for word and sort model