Fix type errors.