fix endblock