Fixed bugs on the localization (scale/orientation)