fixed #5

added trim() on #L303 and removed trailing spaces