Make it crashsafe