fixed client crash on removing friends. Closes #1077