I had attended a Skype interview recently with a pretty known firm in a foreign country. Part of the interview involved a fairly easy task but the interviewer pronounced words that I did not understand. While trying to clarify, there were misunderstandings which caused friction that hadn't been there at the start. The interviewer seemed to become hostile and made sarcastic remarks about people from my country. Eventually, I was able to understand what he wanted and the interview progressed. But by this time the mood had soured, the interview went downhill and in the end the firm decided not to progress to the next round.
What can I do to salvage an interview if it has turned based on a misunderstanding? And how can one be better prepared to handle interviews turning hostile?