fix initialization of use_shared_memory