Merge pull request #374 from skpcharles/master

Added index API support in collection copy
Fixed null pointer issue while collection copy