Minor bug fixing regarding safeDsitrict