Judge urges action over prostitutes