fix some NPE