fixed database recovery problem