Updated to by python3 compatible.