patched REE to make the valgrind reading more clear.