fixed database setting at end of job