minor bug in script