corrected uninitialized pointers errors