Updated ModelSecurity to fix the concurrency issue