Fix error when change mode from variation