Correctly set the new name length
Delete color hash at end