Fixed bug with link switch