fixxed trim bug