Fixed an IE issue where trim is not supported