Merge change 1909 into donut

* changes:
  Fixed IndexOutofBoundException, improved how memory information is captured (run GC first)