Fixed a small bug that was causing the script to break