Merge pull request #27 from klali/master

Make sure to mask when casting byte to short in receiveBytes()