updated code such that to fix Firefox 24 ssl certificate issue