fix bug in hash.restrict after refactoring to OD