fixed a bug in cfg3