fix for nullpointerex