fix slice error in _set_limits