Fixing bug in HTML DOM compilation