Fixed the issue with locks in WebApplication.