Various fixes to do with deploying the same app several times on the same site