Fixed a bug where whitespace was introduced to the end of whared component names from a faulty regex expression.