bugfix to prevent NPE