Fixed bugs in BlockChain and main program.