fixed artifacts caused by unprecise distance transform