Fixes for MySQL