change loading and fix trim bug