Fix a lot of pointer errors.