Fixed error where the js wasn't getting appended to the page correctly