Fixing consistency issues across flash/cpp target