background+wrong minDist-check fixed