Hotfix script

Made some minor changes. Wasn't ready to merge last time.