fixed a few things so that database tests passed again