fix for ssl termination issues