fixed creation of in-query