trim bug fixed