Updated ports and tried to fix connection code