The problem is that some short urls are prefixes of others. You could fix this by creating a shortner where the links were always 6 chars long and never shorter or longer (giving you almost 20 billion URLs anyway)