Replaced substring() call with trim() [MINOR]