Small changes to make script usable in our setup