Stats update and better crash recovery
Fixed conflict
Fixed missing stats definition