Fix bad index lookups in remove and update
Merge pull request #9 from BinaryMuse/patch-1

Fix bad index lookups in remove and update