There is a slight thread overlaping which i resolved by sleeping the initialization of the client for a second.. it works fine now. No more issues, but I would like to address this in more detail after finishing the core.