Reintroducing compatBytes function