Fixed a problem with trimming empty strings.