more back ported stuff (inv)