diff --git a/ccxt.js b/ccxt.js
index <HASH>..<HASH> 100644
--- a/ccxt.js
+++ b/ccxt.js
@@ -4440,7 +4440,8 @@ var btce = {
         let orderInfo = response['return'][id];
         let isCanceled = false;
         let canceled = [2, 3];
-        if (orderInfo['status'] in canceled)
+        let orderStatus = orderInfo['status'];
+        if (orderStatus in canceled)
             isCanceled = true;
         let result = {
             'info': response,
#<I> and another minor one for php