Fix bug when delay happens