Your examples are working fine for me.
But it looks like you are calling the function holding this code twice, so you replace the in
to main
, and then (by accident) again the in
in main
to mamain
.
Can you ensure that this code is only executed once on your variable?