Fixing SQLQuery to SQLSelect for master compatibility