Adding two keys to make instantiation and termination more robust