More work to prevent button flickering (race condition)