Add flag to ignore trailing zeros