some performance tuning

thanks for @sept