Added local variable scope to 'button'