Fixed an issue with the script