Fix a few bugs with pointers

Next: Segmention fault
Fix ALL the bugs, working now