Fix nasty inventory wipe bug