some Nullpointer Fixes