fixing bug from migration