fix bug when null properties