removing extra closing head tags