Fixed bug with linking