Fixing ProcessCommands for arrays