Fixed mysql compatibility