Proper handling of generated names and input names