bug fixes (duplicate script execution fixed)