diff --git a/lib/backend.py b/lib/backend.py
index 3cdea3e9937967d48409c9aeff625075b45baa06..54dc0237e354a0f64496c28271472aedca725eed 100644
--- a/lib/backend.py
+++ b/lib/backend.py
@@ -1692,7 +1692,7 @@ def OSEnvironment(instance, debug=0):
 
   for source, kind in [(instance.beparams, "BE"), (instance.hvparams, "HV")]:
     for key, value in source.items():
-      env["INSTANCE_%s_%s" % (kind, key)] = value
+      result["INSTANCE_%s_%s" % (kind, key)] = str(value)
 
   return result