Bugfix: correctly parse ranges