Fix error where ssl would always be used.