Fixed script to work with latest rs update