fixed two regressions (NPE) caused by previous commit
2 files changed