Fix a bug using optional kwargs to create buttons.