Fixed some CMOS bugs.