fixes possible inventory glitch