add missing idAttribute; guard against undefined options