fix issues with script