Still have one case of concurrency issues. Changed to atomic ints