Fixed some bugs with links