fixed various unicode bugs