fixed message handling