length validator fixed

Fixes #26