corrected bugs due to implicit db removal