bug fix for item handling