Remove flags. Handle non-set script path