a few fixes to the mysql file