Fixes insert and delete