fixed locale and some syntax errors

obvious