fixed: executing of middleware