Fix several errors.