Some more functions and crash recovery