fixxing nullpointer errors via config