fixed bugs with links to external attachments