Fix for MySQL 5 compatibility