Avoiding an open <h2>tag when entry-info is hidden

I was doing {% block entry-info %} {% endblock entryinfo%} in my custom template and found that <h2> was open when I was fixing the css. This should avoid the problem.