inventory fix do while loop

update