fix issue with null bindings, change around the query compiler