Fix On Error crash, do some work for Unicode