Update script to work correctly

closes #3