Possible fix for issue#1.
Refactored the message pipe logic. Added an extra test for this issue. Still need to test this against real hardware.
Merge pull request #3 from StevePo/issue_1

Issue 1