Fixed the misinterpretation of length parameter, which caused some unit tests failed.
Merge pull request #2 from adatao/adatao-fix-missing-value

Presumed tested.