fixed persistentID == nil will make compare crash