Fix timing of showing buttons