Fixing CPU segfault bug, and improving CGA.