fixes for safety template