Fix acs_map segfault
make it more robust
Merge pull request #34 from mahkoh/array_fix

Fix acs_map segfault.