Made some contact code less likely to perma-freeze the UI