correcting error for stopbutton