minor bug fix in program rewriting with peername