Fixed but in setTrimming function