Fixed trim bug