fixed visibility toggle on the button and the dataset table, exits properly on exit