Fixes #2 Adds validation on length