Fixed Null pointer exception for HTML5 first render hack