fix compiler flag bug