Fix errors when no data