Added option to hide empty buttons.