Fixed some pointer stuff