proper query factor LHS handling