fix NullPointer
Merge pull request #992 from cascheberg/fix

fix NullPointer