Use str instead of bytearray

Fixes change I made in 97277fb