Fix: type casting that involves variant types.