Merge some commits to 1.7.9

Fix a null pointer exception