fix NPE in toString