Fix a few crashes
v1.7.1
Fix a crash