Improved button disabling