fix: toSQL does not modify select object