fix invalid py 2.7 only syntax