fix bug in leave messages