Minor fixes in script