Fixed a few DOM functions