Fix setting inventories, fixes #912