Fixed infinite recursion in addButton