Fixed script linking errors