fixed minor bug against python3.2