switch to http for dev environment
fixed mismatch parenthesis
sets protocol based on current protocol

Works fine on init but breaks on when changing protocol