Fix setting range when saving through variant attributes.