Fixed bug causing connections to not affect rendering. Added json parameter to set hostname