Various fixes for https