Corrected an error that was causing link weights to be set incorrectly.