Fixed linking but it's not a pretty solution