modify script and remove invalid command