Fixed a few issues.
PWS-101 #comment fixed a few issues with replacing the links.