fix bug when prop is nill.