Moved setting the locale value to the right position.