MADS: set public 2 inventory functions, fix signed/unsigned comparison