Bug fixes and support for MySql