Fix acs_map segfault
make it more robust