fix out of bounds read in abr_find()
mark rex methods as static