fixes for migration to mysql