fix the example under python 2.7