now finishes execution without crashing
bugfix: added protection against getRegion returning 0
Merge pull request #3 from MT2Analysis/pandolf

Pandolf