Fixed getSafeLocation.
I feel stupid.