I have a simple script that works correctly in another application I extracted it from but I get strange behaviour. In particular, it\'s a simple task of adding info to arra