fix segfault if shm not found