fix bug in subject-alloc