Added trim in some places