A small fix to finalChain.R