bug fix and auto create element for ie8