Update solution, forgot to shallow copy the counter