fixed some pointer stuff