fixed linking and made some further adjustements to scaling