fixed int16 overflow
Merge pull request #323 from eku/fixedpoint

fixed int16 overflow