Bugfix for deprecated intInRange-Function