fix python 3 issue with migrations #27