Trying to fix test_matrix bug by making atomic_counted_object.