Fix bug in script.