diff --git a/src/main/java/org/eluder/jersey/mustache/MustacheViewProcessor.java b/src/main/java/org/eluder/jersey/mustache/MustacheViewProcessor.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/eluder/jersey/mustache/MustacheViewProcessor.java
+++ b/src/main/java/org/eluder/jersey/mustache/MustacheViewProcessor.java
@@ -122,7 +122,7 @@ public class MustacheViewProcessor implements ViewProcessor<Mustache> {
         
         // render the actual template
         OutputStreamWriter writer = new OutputStreamWriter(out);
-        t.execute(writer, getScope(viewable)).flush();
+        t.execute(writer, getScope(viewable)).close();
     }
 
     /**
Writer must be closed to correctly flush asynchronous data to response. Closing underlying stream is not enough.