fixed locale bug in simplerewrites optimizer