Campaign db update

- fixed bugs in campaign database code