fix bug in mysql