added check for if link did not exist