Fixed bug in opening book generation tool