Trim extra spaces