Fix some NPE