Minor improvement for removing internal spaces but one in metadata