update code for white screen and deduping links