Fix NPE with console message