Trying to fix document.getElementById(var) issue