id length calculation should not include the extension

Fixes #55.