Fix issue with links that have an invalid target