Fixed a small bug that occured when creating or editing a variant.