Fixed deprecated to_byte() calls.