an exception handler for ranges

some more fixes