NPE fix
Merge branch 'master' into npe_fix
Merge pull request #195 from apaiva/npe_fix_another

Npe fix another