fix button flow