fix a bug in the new exp for exp-middleware