Fixing AutoField for Python 3