Added support for button states