Fixing a small script bug