made TH standalone installation more flexible