fix a bug on mysql