fixed message handling in attach case