Fixes to allow http or https for communication