fix undeliver bug