some trimming
fixed concurrent bug