Fix npe when first install