Hacky way to fix multithreaded issue, still broken