Change script to fix exception