[fix] fixes the problem with not detecting the end of the transmission
Merge pull request #93 from xively/fix-final-condition

[fix] fixes the problem with not detecting the end of the transmission