irange error fixed