fixed bug with begin button