Migration bug fix