fix for npe that would happen at the end of friend processing