Fix incorrect indexing the items array in the update() function

Thanks for sharing BookBlock, great stuff :)