Fix some type errors.