Bugfix against a NPE