Adjusted the 'trim()' method for IE.