fix delay in test mode