Fix NPE
Merge pull request #109 from CodePath-MAF/last-minute-fixes

Fix NPE