Fixed possible class cast exception
Fixed iventories spilling items on break