Wait function repair