Bugfix. semaphore id and shm id can be 0 so 0 cant be the "not yet initialized" value.