changed terminate script to not kill itself