fixing issue with trim