Fixed issues with deleted users and links