Fixes and Thread-safe singleton