fixing npe.
Merge pull request #14 from edx/e0d/npe-fix

fixing NPE