fixed database dependency bug