fix <% end %> output for top level blocks