Fixed addition of the element. Now this.items.length is correct.