fixes error when space url uses http instead of https