fixing bug with link extraction picking up extra characters