Fixing log_heap printing a bit, though damn this stuff is nasty.