fix trim attributes