fixes for mysql