DB major bug fixes