fix script a bit