Fixed some pointer errors.