Minor changes to the use of trigger_error