Moved the script so it works on all pages