fix for nullpointer