Fix bugs related to python3.4