Threading issues solved