changed compiler flags and fixed double truncation