Check pin-length before changing them

Closes #16.