Fixed huge bug with core data multithreading