Re-add env when creating a connection