It was an issue with Github pages, where it was using an old version of my script file. I deleted and made a new repository and it solved the issue.