added fallback if reason attribute name is nonexistant