change scope of $html to fix build