Merge "Fix a NPE found by Moneky." into jb-dev