Fixed check such that both sides use bytes.

The possible problem here is that the left side uses bytes while the right side uses characters.
(Probably a theoretical problem)