changed key fetch logic
changed key fetch logic
fixed conflict in leave protocol code