Fixed error with deleting notes