Nullpointer Fixes