Fixed small bug in new script