prevent nullpointerexception