Added support for custom buttons