Fix crash on random data for contacts