bug in long message code fixed