Add is_initialized member to avoid multiple initialization attempts.