changed deprecated widget to button and fixed error occurring when [] in name

You are right, I will push the changes shortly.