fixes the string NPE bug