Fix context recreation after restarting