Fixed pointers that were not being typecasted
Fixed merge errors