some fixes, add env.connector option