Fixed Pointer errors