fixes for mysql support