merge mips fix and statetrace changes