guard against rubbish data when retrieving remote gateway info, closes #233