Set class of out of memory message since it's initialized before string.