Fixed message listener: It does not process messages twice, or get its butffers out of sync.