fixing code for links