fixing py3 issue (long being the same as int)