diff --git a/lib/tvdb_party/httparty_icebox.rb b/lib/tvdb_party/httparty_icebox.rb
index <HASH>..<HASH> 100644
--- a/lib/tvdb_party/httparty_icebox.rb
+++ b/lib/tvdb_party/httparty_icebox.rb
@@ -207,7 +207,7 @@ module HTTParty #:nodoc:
         end
         def set(key, value)
           Cache.logger.info("Cache: set (#{key})")
-          File.open( @path.join(key), 'w' ) { |file| file << Marshal.dump(value)  }
+          File.open( @path.join(key), 'w' ) { |file| Marshal.dump(value, file) }
           true
         end
         def get(key)
on <I> we need Marshal to write direclty to the IO object to prevent encoding issues