Fix a crash
Improve tests