Adding support for deprecated call and self-aware middleware