eh bugfix, range check