fix XHTML-IM messages parsing