migrations bug fix