Fix name length check