Replaced reg_str2array implementation with ket()