Merge "Added fix for potential nullpointer exception"