migration script fix, initial function fix