fix note deletion bug