Made override mechanism thread-safe