fix for apps running on HTTPS