fix issue with bad api responses