Fixed a dumb bug, also made the script automatically detect whether we are debugging or not.