Fix bugs about HTML element getters