fixed database connection (using env vars)