fixes potential security issue whereby ssl connections were not verified