diff --git a/src/crypto_key.cc b/src/crypto_key.cc
index fe67b14532..658586baed 100644
--- a/src/crypto_key.cc
+++ b/src/crypto_key.cc
@@ -8,7 +8,7 @@
 
 NAN_METHOD(extractPublic)
 {
-	const auto sourceString = info[0]->ToString();
+	const auto sourceString = info[0]->ToString(Nan::GetCurrentContext()).ToLocalChecked();
 	if (!sourceString->IsOneByte()) {
 		Nan::ThrowError("Malformed character found");
 		return;