fixed issue where %prog was not replaced with script name