Multithreading getInstance fix