[QUOTES] Minor rewrite to fix query error