Final bug fixing for HTML5UI: pull request #91