fix to avoid NPE