refined handling unusual links
oops syntax error fixed