Fixed missing code.

Hopefully fixed cop base gates, and other stuff.