fix a bug for illegal sql data