Update script to make it work properly.