Fixing for some issues for nil data.
Fixing for an issue related to crashing
Fixing a few more issues related to endorsements