Fixed bugs in widget with buttons