Fix bug with null data