null pointer exception with sizeof(junk) fixed