diff --git a/data/libs/functions/game.lua b/data/libs/functions/game.lua
index 4be079586d2..5682f5c5869 100644
--- a/data/libs/functions/game.lua
+++ b/data/libs/functions/game.lua
@@ -138,7 +138,7 @@ function Game.setStorageValue(key, value)
 
 	if value == -1 then
 		if globalStorageTable[key] then
-			table.remove(globalStorageTable, key)
+			globalStorageTable[key] = nil
 		end
 		return
 	end