Fix for nullpointer