Fix some cases where wrapper types were incorrectly used.