NULL POINTER FIX, or how I learned to love debug mode

also some other tweaks....??? this is poor git practice