Fixed errors in Variant code