Fixing crash caused by bad server data