fixed thor scripts