avoided some thread/applet.g null pointer exceptions by adding warnings