fixed issue with the unresponsive script algorithm