Bugfix prevent NPE