Fixed MIPS issue and made Python 3.x compatible.