added defensive code for facebook, twitter, and website