fixed reading config, connecting, crash