Merge "Added fix for potential nullpointerexception"