fixed bugs on the build script concerning localisation