id length calculation should not include the extension

also removes useless and invalid use of join()