Improved buttons status management.