Updating script with (almost) forgotten changes

Note: This Update was done remove/via Github web interface and may not be properly formatted (no idea how this works).