fixed bug in long message sending