fix querying which broke in last commit