Fixed sloppy memory calculation.