Updates for compatibility with MySQL database