protect against crashes