resolved database bugs