fix constructor from charcodes