bug in https implementation fixed