Fixed CMOS bugs