BugFixed: crash when history_sw contains unicode