corrects a couple bugs in the powershell hook runner