fixed compatibility with MySQL