Fixed some type errors.