Fixes type for `chain`.