Fix the target decision bug in shmem version