Add sleep() to avoid problems with TW