#166: substitute incorrect SQL