Fixed adaptation for 3.* Python ver.