diff --git a/slapos/grid/slapgrid.py b/slapos/grid/slapgrid.py
index dc9e8b6afcf5d2beb8e684b27fb35c4f0d1ffc7f..6e42ec23f27ef628599c44d81d52ce4d6f7a5bd8 100644
--- a/slapos/grid/slapgrid.py
+++ b/slapos/grid/slapgrid.py
@@ -575,14 +575,15 @@ class Slapgrid(object):
         self.instance_root, computer_partition_id)
       timestamp_path = os.path.join(instance_path, '.timestamp')
       if os.path.exists(timestamp_path):
-        descriptor = open(timestamp_path)
-        old_timestamp = int(descriptor.read())
-        descriptor.close()
+        old_timestamp = open(timestamp_path).read()
         parameter_dict = computer_partition.getInstanceParameterDict()
         if 'timestamp' in parameter_dict:
-          timestamp = int(parameter_dict['timestamp'])
-          if timestamp <= old_timestamp:
-            continue
+          timestamp = parameter_dict['timestamp']
+          try:
+            if int(timestamp) <= int(old_timestamp):
+              continue
+          except ValueError:
+            pass
       try:
         software_url = computer_partition.getSoftwareRelease().getURI()
       except NotFoundError: