Fixed: I should return the byte pointer, not the array index.