a few bugs fixed in AC part