Use maxsize var (fixes GH-897)