Improved the check on the maximum_distance
Improved the check on the maximum_distance


Former-commit-id: ee7225681aee582808719f548f75697de47447bf [formerly ee7225681aee582808719f548f75697de47447bf [formerly 82528eab56c04be8f56feaaa96bdd6e67a26bebe]]
Former-commit-id: 0574623a7a88149f346f5dec239374a82bb89b83
Former-commit-id: 7debd99ad7957d118ae6967a49fbe54378e92286
gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine