fix(middleware): fix static server crash with fork