Fixed a bug where NSFetchRequest would fetch nil entity.