Fixed many copy/paste bugs.