Fixed infinite loop

The infinite loop when getting the data, but it fails. Now hopefully
finally.