Fixed bugs in torch placement and logic