fix db access check
fix merge conflicts form revert
remove more merge conflicts