Fixed bug where players could lose their inventory