fixes to safeguards