fix bug with mysql