fix bug with multi middleware on same route and added jmx support