fixed py3 check; should have used chars instead of ints