Fixed script
Fixed fatal error (#571)