bug in script