Fix bug in memory logging.