make queries int for NPE protection