message logic fixed