Fix links swapping in links_controller