fixed connection issues and 'run' command