fix for non-localhost connect
Minor changes/fixes to relax script