fix parsing bug on python 2.7