fixed database issue