avoid NPE when reporting error