Update add.ctp

Some bug fixes