It took me some time but basically this is **the fix** :) Together with extracting `$ns` out of the loop -- it's a small but how powerful thing ;)