Fix error that sometimes appears with no data