Fixing heap resizing.