Small changes to connect script