Fixed the storing of steps in the CP database