fixed change events for deletions and added some tests for that