fixed handling of byte arrays