Fix  duplicate code causing the script to not function (High Prio)
Merge pull request #2 from cPJerry/master

Fix  duplicate code causing the script to not function (High Prio)