NPE Fix Feature Branch

NPE fixes from rSmart/issues#243
If you amended a commit, it will get a new commit hash.  L