fixed error with trim()