Merge pull request #49 from onkar-dhuri/2.2

Fixed NPE for metadata while handling collection of complex