fix messagage handling