revert script to original buggy version