fix crash when encountering non-string
fix byte problem with ' -> '