minor changes and fix migration