Quick fix for nullpointerexception... (please test)