fixed trim error