add emit of delete hook
fix unit test