updated some bugs in python