fixing client for mod and multithreading