script bugfix