set the right mode on build script