changed pretti_type_flag ref to value instead of variable name