Bugfix in external ip check