cleanup links of deleted notes