Started adding concurrency control in middleware methods