fixed nullpointerexceptions in GUI