Fixing potential null reference exception (See https://fabtab.codeplex.com/workitem/10912)
Merge pull request #1 from odalet/master

Fixing Codeplex issue 10912