link contract bugfixes