fixed stop generation in button script