fixing strange behavior of the mysql driver