Added stuff to clear X-1 and fixed a bug where C was lost