Fix "connection closed" error.

Use the same connection instead of opening a new one for every field.