Fixed NPE from bug report.