Fix a bug when there are NULL field