handle link loading errors

Closes #85.