Fix errors when data is incomplete