corrected bug in spawning items