Https and multi project fixes

I recently used this plugin for some work and found these problems.
I initially worked around them, now I took the time to back-port the workarounds as proper fixes.