migrations fix for python 3