Improved button management