Fixed a bug revealed by python3.4