Fixed clearNotes code