fixed a minor output bug in mem.js