Fix delete note bug
Fix warning for NullPointException