Fix memory checking.
6 files changed