fix the problem when container restarts