keep item count when changing items. fixes #111