Fixed errors when data doesn't load properly.