bugs fixed, messages sended before session is closed are now delivered!