Replaced null returns with memerrs.