Removed dead code; fixed disabled button flashing