fixes a bug on mysql2 adapter