fix script to not kill itself